#pragma once
#include "stdafx.h"
#include "RenderObject.h"
#include "Resource.h"
#include "Effect.h"
/*
	This is an internal class in RenderObjectManager.
	Only RenderObjectManager class need to care about what's happened
	in this class. Maybe it could be grouped in RenderObjectManager like:
	class RenderObjectManager
	{
		class RenderQueue
		{
			...
		};
		...
	};
*/

class RenderObject;
class Resource;
class Component;
class Effect;

class RenderQueue : public Component
{
public:
	typedef boost::shared_ptr<RenderQueue> sPtr;
	typedef list< RenderObject::sPtr > RenderObjectVect;
	RenderQueue();
	~RenderQueue();
	void AddRenderObject(RenderObject::sPtr );
	void AddedToObject();
	void Render();
	void RenderSignalObject(RenderObject::sPtr &);
	void RemoveObject(string);
	void RemoveAllObject();
	void Initial(const string);
	void RenderTest();
	stringstream Dump();

	void SetViewMatrix();
	void SetPerspMatrix();
private:
	RenderObjectVect m_renderQueueMap;
	ID3D11InputLayout* m_vertexLayout;
	boost::shared_ptr<Effect> m_effect;
};